<%= form_for(@student) do |f| %>
  <% if @student.errors.any? %>
    <div class="fberrorbox" id="error_explanation">
      <h2><%= pluralize(@student.errors.count, "error") %> prohibited this student from being saved:</h2>

      <div>
      <% @student.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </div>
    </div>
  <% end %>
  <div class="fbbluebox">
    <div class="fbgreybox"><h2>1. Personal Information</h2> </div> <br />
        <table>
            <tr>
                <td>
  <div class="field">
    <%= f.label :title %><br />
    <%= f.select(:title, Student_status::TITLE) %>
  </div>
        </td><td>
    <div class="field">
    <%= f.label :firstname, 'First name' %><br />
    <%= f.text_field :firstname %>
  </div> </td> <td>
  <div class="field">
    <%= f.label :lastname, 'Last name' %><br />
    <%= f.text_field :lastname %>
  </div>  </td>
     </tr>
     <tr><td>
        <div class="field">
    <%= f.label :title_th, 'คำนำหน้า' %><br />
    <%= f.select(:title_th, Student_status::TITLE_TH) %>
  </div>
        </td><td>
    <div class="field">
    <%= f.label :firstname_th, 'ชื่อ' %><br />
    <%= f.text_field :firstname_th %>
  </div> </td> <td>
  <div class="field">
    <%= f.label :lastname_th, 'นามสกุล' %><br />
    <%= f.text_field :lastname_th %>
  </div>  </td>
     </tr>
   <tr>
     <td>
        <div class="field">
    <%= f.label :sex , 'Sex'%><br />
    <%= f.select(:sex, Student_status::SEX) %>
  </div>
   </td>
     <td>
       <div class="field">
    <%= f.label:student_id, 'Student ID' %><br />
    <%= f.text_field :student_id %>
  </div>
     </td>
     <td>
  <div class="field">
    <%= f.label :status, 'Status'%><br />
    <%= f.select(:status, Student_status::STUDENT_STATUS) %>
  </div>
      </td>
    </tr>
      </table>


  <div class="field">
    <%= f.label :dob, 'Date of Birth'%><br />
    <%= f.datetime_select(:dob, :start_year => Date.current.year, :end_year => 1970)%>
  </div>

    <div class="field">
    <%= f.label :id_card_no, 'ID card number' %><br />
    <%= f.text_field :id_card_no %>
  </div>
         <div class="field">
    <%= f.label :phone_number, 'Phone number' %><br />
    <%= f.text_field :phone_number %>
  </div>
        <div class="field">
    <%= f.label :email , 'E-mail' %><br />
    <%= f.text_field :email %>
  </div>

  <table>
    <tr>
      <td>
    <div class="field">
    <%= f.label :religion ,'Religion'%><br />
    <%= f.text_field :religion %>
  </div>
     </td>
      <td>
        <div class="field">
    <%= f.label :race ,'Race'%><br />
    <%= f.text_field :race %>
  </div>
      </td><td>
      <div class="field">
    <%= f.label :nationality , 'Nationality'%><br />
    <%= f.select(:nationality, Country::COUNTRY)%>
  </div></td>
    </tr>
  </table>

        <div class="field">
    <%= f.label :gpa, 'GPA'%><br />
    <%= f.text_field :gpa %>
  </div>

    <table>
      <tr><td>
    <div class="field">
    <%= f.label :advisor, 'Advisor' %><br />
    <%= f.text_field :advisor %>
  </div>
        </td>
        </tr>
      </table>
        <div class="field">
    <%= f.label :military_service, 'Military Service' %><br />
    <%= f.select(:military_service, Student_status::MILITARY_SERVICE)%>
  </div>

  <table>
    <tr>
      <td>
    <div class="field">
    <%= f.label :permanent_address ,'Permanent address'%><br />
    <%= f.text_area :permanent_address %>
  </div></td>

    <tr>
      <td>
        <div class="field">
    <%= f.label :present_address, 'Present address' %><br />
    <%= f.text_area :present_address %>
  </div>
      </td>

    </tr>

  </table>
  </div>

    <br />

  <div class="fbbluebox">
  <div class="fbgreybox"><h2>2. Parent Information</h2>  </div><br />

        <div class="field">
    <%= f.label :father_name, 'Father\'s name' %><br />
    <%= f.text_field :father_name %>
  </div>
        <div class="field">
    <%= f.label :mother_name, 'Mother\'s name' %><br />
    <%= f.text_field :mother_name %>
  </div>
        <div class="field">
    <%= f.label :parent_address %><br />
    <%= f.text_area :parent_address %>
  </div>
  </div>
  <br />

  <div class="fbbluebox">
  <div class="fbgreybox"><h2>3. Emergency Contact Information</h2>  </div> <br />

        <div class="field">
    <%= f.label :emergency_contact_name %><br />
    <%= f.text_field :emergency_contact_name %>
  </div>
        <div class="field">
    <%= f.label :emergency_contact_relationship %><br />
    <%= f.text_field :emergency_contact_relationship %>
  </div>
        <div class="field">
    <%= f.label :emergency_phone %><br />
    <%= f.text_field :emergency_phone %>
  </div>
        <div class="field">
    <%= f.label :emergency_email %><br />
    <%= f.text_field :emergency_email %>
  </div>
  </div>

    <br />

   <div class="fbbluebox">
  <table>
    <tr> <div class="fbgreybox"> <h2>4. Language Proficiency</h2></div> <br />
      <td>
        English
      </td>
      <td>
         <div class="field">
    <%= f.label :language_english_listening, 'Listening' %><br />
    <%= f.select(:language_english_listening, Student_status::LANGUAGE_PROFICIENCY) %>
  </div> </td><td>
         <div class="field">
    <%= f.label :language_english_speaking, 'Speaking' %><br />
    <%= f.select(:language_english_speaking, Student_status::LANGUAGE_PROFICIENCY)  %>
  </div>  </td><td>
           <div class="field">
    <%= f.label :language_english_reading, 'Reading' %><br />
    <%= f.select(:language_english_reading, Student_status::LANGUAGE_PROFICIENCY)  %>
  </div>   </td><td>
           <div class="field">
    <%= f.label :language_english_writing, 'Writing' %><br />
    <%= f.select(:language_english_writing, Student_status::LANGUAGE_PROFICIENCY)  %>
  </div>
    </td>
   </tr>
  </table>
  </div>
  <br />
  <div class="fbbluebox">
  <div class="fbgreybox"> <h2>5. Senior Project Information</h2></div><br />

         <div class="field">
    <%= f.label :senior_project_topic %><br />
    <%= f.text_field :senior_project_topic %>
  </div>
         <div class="field">
    <%= f.label :senior_project_overview %><br />
    <%= f.text_area :senior_project_overview %>
  </div>
  </div>
  <br />


  <div class="fbbluebox">
  <div class="fbgreybox"> <h2>6. Computer Language Information</h2> </div> <br />

           <div class="field">
    <%= f.label :computer_language %><br />
    <%= f.text_area :computer_language %>
  </div>
  </div>
  <br />

  <div class="fbbluebox">
  <div class="fbgreybox"> <h2>7. Other Information</h2> </div><br />

           <div class="field">
    <%= f.label :other_skills %><br />
    <%= f.text_area :other_skills %>
  </div>
  </div>
  <br />

  <div class="fbgreybox">
  <div class="actions">
    <%= f.submit %>
  </div>
  </div>
<% end %>
